<%@ page contentType="text/html; charset=GBK"  pageEncoding="GBK" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<html>
<head>
<title>Menu</title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<script src="public/tree.js" type=""></script>
<link type="text/css" rel="stylesheet" href="public/tree.css">
<style>
body{
 scrollbar-base-color:#FBA046;
 scrollbar-arrow-color:#FFFFFF;
 overflow-x:hidden;
 padding:0px;
 margin: 15px;
}
</style>
</head>
<body bgcolor="#FBA046">
<SCRIPT LANGUAGE="JavaScript" type="">
<!--
function loadTree(url){
    if (url != ""){
		parent.main.location=url;
    }
}
//-->
</SCRIPT>
<logic:present name="menuTree" scope="request">
  <SCRIPT LANGUAGE="JavaScript" type="">
     <logic:iterate id="menu" name="menuTree" offset="0" length="1">
      var item<bean:write name="menu" property="menuCode"/> = new acTree('<bean:write name="menu" property="menuName"/>');
      item<bean:write name="menu" property="menuCode"/>.setBehavior('classic');
      item<bean:write name="menu" property="menuCode"/>.action = "javascript:loadTree('<bean:write name="menu" property="menuAction"/>')";
      item<bean:write name="menu" property="menuCode"/>.icon = '<bean:write name="menu" property="icon"/>';
      item<bean:write name="menu" property="menuCode"/>.openIcon = '<bean:write name="menu" property="openIcon"/>';
    </logic:iterate>

    <logic:iterate id="menu" name="menuTree"  offset="1">
      var menuCode = <bean:write name="menu" property="menuCode"/>;
      var item<bean:write name="menu" property="menuCode"/> = new acTreeItem('<bean:write name="menu" property="menuName"/>');
      item<bean:write name="menu" property="menuCode"/>.action = "javascript:loadTree('<bean:write name="menu" property="menuAction"/>')";
      item<bean:write name="menu" property="menuParent"/>.add(item<bean:write name="menu" property="menuCode"/>);
      item<bean:write name="menu" property="menuCode"/>.icon = '<bean:write name="menu" property="icon"/>';
      item<bean:write name="menu" property="menuCode"/>.openIcon = '<bean:write name="menu" property="openIcon"/>';
   </logic:iterate>
   
   <logic:iterate id="menu" name="menuTree" offset="0" length="1">
      document.write(item<bean:write name="menu" property="menuCode"/>);
   </logic:iterate>
    //item101000000.expandAll();
  </SCRIPT>
</logic:present>
<logic:notPresent name="user"  scope="session">
  <SCRIPT LANGUAGE="JavaScript" type="">
   window.location='doLogout.do';
  </SCRIPT>
</logic:notPresent>
</body>
</html>
